import java.text.SimpleDateFormat;
import java.util.Date;

public class Employee extends BaseEntity{
    private String username;
    private String name;
    private String gender;
    private String job;
    private Date ServiceDate;
    private String department;

    public Employee() {
    }

    public Employee(String username, String name, String gender, String job, Date serviceDate, String department) {
        this.username = username;
        this.name = name;
        this.gender = gender;
        this.job = job;
        ServiceDate = serviceDate;
        this.department = department;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public Date getServiceDate() {
        return ServiceDate;
    }

    public void setServiceDate(Date serviceDate) {
        ServiceDate = serviceDate;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    @Override
    public String toString() {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        String formattedServiceDate = dateFormat.format(getServiceDate());
        return String.format("%-10s | %-10s | %-10s | %-10s | %-20s | %-10s",
                username, name, gender, job, formattedServiceDate, department);
    }
}
